package bg.unisofia.fmi.tis.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="t_comment")
public class Comment extends Identity {
	
	private User professor;
	private String content;
	private Date submittedOn;
	
	private Thesis thesis;
	
	@ManyToOne
	@JoinColumn(name="professor_id")
	public User getProfessor() {
		return professor;
	}
	
	public void setProfessor(User professor) {
		this.professor = professor;
	}
	
	
	@Column(length=500)
	public String getContent() {
		return content;
	}
	
	public void setContent(String content) {
		this.content = content;
	}
	
	
	public Date getSubmittedOn() {
		return submittedOn;
	}
	
	public void setSubmittedOn(Date submittedOn) {
		this.submittedOn = submittedOn;
	}

	@ManyToOne
	@JoinColumn(name="thesis_id")
	public Thesis getThesis() {
		return thesis;
	}

	public void setThesis(Thesis thesis) {
		this.thesis = thesis;
	}
}
